import request from '@/utils/request'

export function getProductList(params) {
  return request({
    url: '/product/list/',
    method: 'get',
    params: params
  })
}

export function addProduct(data) {
  return request({
    url: '/product/',
    method: 'post',
    data
  })
}

export function getProductDetail(params) {
  return request({
    url: '/product/'+params,
    method: 'get'
  })
}

export function updateProduct(data) {
  return request({
    url: '/product/',
    method: 'put',
    data
  })
}